package com.lavida.project.system.emp.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lavida.common.utils.DateUtils;
import com.lavida.project.system.emp.domain.Roster;
import com.lavida.project.system.emp.mapper.RosterMapper;
import com.lavida.project.system.review.domain.Review;
import com.lavida.project.system.review.mapper.ReviewMapper;

@Service
public class RosterServiceImpl implements RosterService{

	@Autowired
	private RosterMapper rosterMapper;
	@Override
	public List<Roster> selectRoster(Roster roster) {
		// TODO Auto-generated method stub
		return rosterMapper.selectRoster(roster);
	}
	@Override
	public int insertRoster(Roster roster) {
		// TODO Auto-generated method stub
		return rosterMapper.insertRoster(roster);
	}
	@Override
	public int deleteRoster(int[] job_ids) {
		int j = 0;
		for(int i =0;i<job_ids.length;i++) {
			rosterMapper.deleteRoster(job_ids[i]);
			j ++;
		}
		return j;
	}
	@Override
	public Roster getRoster(int job_id) {
		// TODO Auto-generated method stub
		return rosterMapper.getRoster(job_id);
	}
	@Override
	public int updateRoster(Roster roster) {
		// TODO Auto-generated method stub
		return rosterMapper.updateRoster(roster);
	}
	@Override
	public List<Roster> selectRosters() {
		// TODO Auto-generated method stub
		return rosterMapper.selectRosters();
	}
	@Override
	public Roster selectRosterscard(String id_card) {
		// TODO Auto-generated method stub
		return rosterMapper.selectRosterscard(id_card);
	}
}
